package com.ruoyi.room.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.room.mapper.RoomDrawPresaleMapper;
import com.ruoyi.room.domain.RoomDrawPresale;
import com.ruoyi.room.service.IRoomDrawPresaleService;

/**
 * 预售发放记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-14
 */
@Service
public class RoomDrawPresaleServiceImpl implements IRoomDrawPresaleService 
{
    @Autowired
    private RoomDrawPresaleMapper roomDrawPresaleMapper;

    /**
     * 查询预售发放记录
     * 
     * @param id 预售发放记录主键
     * @return 预售发放记录
     */
    @Override
    public RoomDrawPresale selectRoomDrawPresaleById(Long id)
    {
        return roomDrawPresaleMapper.selectRoomDrawPresaleById(id);
    }

    /**
     * 查询预售发放记录列表
     * 
     * @param roomDrawPresale 预售发放记录
     * @return 预售发放记录
     */
    @Override
    public List<RoomDrawPresale> selectRoomDrawPresaleList(RoomDrawPresale roomDrawPresale)
    {
        return roomDrawPresaleMapper.selectRoomDrawPresaleList(roomDrawPresale);
    }

    /**
     * 新增预售发放记录
     * 
     * @param roomDrawPresale 预售发放记录
     * @return 结果
     */
    @Override
    public int insertRoomDrawPresale(RoomDrawPresale roomDrawPresale)
    {
        return roomDrawPresaleMapper.insertRoomDrawPresale(roomDrawPresale);
    }

    /**
     * 修改预售发放记录
     * 
     * @param roomDrawPresale 预售发放记录
     * @return 结果
     */
    @Override
    public int updateRoomDrawPresale(RoomDrawPresale roomDrawPresale)
    {
        return roomDrawPresaleMapper.updateRoomDrawPresale(roomDrawPresale);
    }

    /**
     * 批量删除预售发放记录
     * 
     * @param ids 需要删除的预售发放记录主键
     * @return 结果
     */
    @Override
    public int deleteRoomDrawPresaleByIds(Long[] ids)
    {
        return roomDrawPresaleMapper.deleteRoomDrawPresaleByIds(ids);
    }

    /**
     * 删除预售发放记录信息
     * 
     * @param id 预售发放记录主键
     * @return 结果
     */
    @Override
    public int deleteRoomDrawPresaleById(Long id)
    {
        return roomDrawPresaleMapper.deleteRoomDrawPresaleById(id);
    }
}
